<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>历史贷款</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"content="width=device-width, initial-scale=1, maximum-scale=1">
<script src="../../../js/angular.js"></script>
<link rel="stylesheet" href="../../../layui/css/layui.css" media="all">
<script type="text/javascript" src="../../../layui/lay/modules/layer.js"></script>
<script src="../../../layui/jquery-3.2.1.min.js" charset="utf-8"></script>
<script src="../../../layui/layui.js" charset="utf-8"></script>
<script type="text/javascript" src="../../../dwwsyyt/dw/gjjhbj/fy.js"></script>
</head>
<body>
	<fieldset class="layui-elem-field layui-field-title"
		style="margin-top: 30px;">
		<legend>历史贷款</legend>
	</fieldset>
	<div ng-app="myApp" ng-controller="customersCtrl" align="center">
		<table class="layui-table" style="width:90%">
			<tr align="center" style="background-color:#f1f1f1">
				<td>借款人姓名</td>
				<td>借款人证件号</td>
				<td>合同贷款金额</td>
				<td>贷款期数</td>
				<td>贷款发放日期</td>
				<td>贷款状态</td>
				<td>贷款还款方式</td>
				<td>贷款结清日期</td>
			</tr>
			<tr ng-repeat="x in names" align="center">

				<td ng-if="$odd" style="background-color:#f1f1f1">{{ x.JKRXM }}</td>
				<td ng-if="$even">{{ x.JKRXM }}</td>
				<td ng-if="$odd" style="background-color:#f1f1f1">{{ x.JKRZJH
					}}</td>
				<td ng-if="$even">{{ x.JKRZJH }}</td>
				<td ng-if="$odd" style="background-color:#f1f1f1">{{ x.HTDKJE
					}}</td>
				<td ng-if="$even">{{ x.HTDKJE}}</td>
				<td ng-if="$odd" style="background-color:#f1f1f1">{{ x.DKQS }}</td>
				<td ng-if="$even">{{ x.DKQS }}</td>
				<td ng-if="$odd" style="background-color:#f1f1f1">{{ x.DKFFRQ
					}}</td>
				<td ng-if="$even">{{ x.DKFFRQ }}</td>
				<td ng-if="$odd" style="background-color:#f1f1f1">{{ x.DKSTATUS
					}}</td>
				<td ng-if="$even">{{ x.DKSTATUS }}</td>
				<td ng-if="$odd" style="background-color:#f1f1f1">{{ x.DKHKFS
					}}</td>
				<td ng-if="$even">{{ x.DKHKFS }}</td>
				<td ng-if="$odd" style="background-color:#f1f1f1">{{ x.DKJQRQ
					}}</td>
				<td ng-if="$even">{{ x.DKJQRQ }}</td>

			</tr>

		</table>
		<div class="layui-btn-group">
			<button class="layui-btn layui-btn-primary layui-btn-sm"
				ng-click="Sy()">首页</button>
			<button class="layui-btn layui-btn-primary layui-btn-sm"
				ng-click="Previous()">上一页</button>
			<button ng-repeat="page in pageList"
				class="layui-btn layui-btn-primary layui-btn-sm"
				ng-click="selectPage(page)">{{ page }}</button>
			<button class="layui-btn layui-btn-primary layui-btn-sm"
				ng-click="Next()">下一页</button>
			<button class="layui-btn layui-btn-primary layui-btn-sm"
				ng-click="Wy()">尾页</button>
			<button class="layui-btn layui-btn-primary layui-btn-sm ">
			    {{selPage}}/{{pages}}</button>
		</div>
	</div>
	<script>
		layui.use('element', function() {
			var $ = layui.jquery, element = layui.element; //Tab的切换功能，切换事件监听等，需要依赖element模块
		});
	</script>
	<script type="text/javascript">
	function getPath() {     
	        return 'http://'+location.host;
	}	
	</script>
	<script type="text/javascript" src="../../../layui/lay/modules/layer.js"></script>
	<script type="text/javascript" src="../../../layui/layer.ext.js"></script>
	<script>
			var a;
			var app = angular.module('myApp', []);
		    app.controller('customersCtrl', function($scope, $http) {
			$http.get(getPath() + "/wsyyt/lishicontroller/test").then(
					function(res) {
						$scope.data = res.data.data.RETDATA;//自己打断点看格式:[{},{}]
								if(res.data.code==1){
									layer.msg('提示：'+res.data.CW,{icon: 5});	
									return null;
								}	
								a = res.data.CNT;
								feny($scope.data);	
					});
			});
		</script>
</body>
</html>